package org.hfy.collections.helper;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description:
 * @Author: Takagi
 * @date: 2023/4/23
 */
public class Symbol {
    public String content;

    public Map<String, Integer> attr = new HashMap<>();

    public Integer value = null;

    public String getContent() {
        return this.content;
    }

    public Symbol(String content) {
        this.content = content;
    }

    public Symbol() {
    }

    @Override
    public boolean equals(Object other) {
        if (other instanceof Symbol) return ((Symbol) other).content.equals(this.content);
        if (other instanceof String) return other.equals(this.content);
        return false;
    }

    @Override
    public int hashCode() {
        return this.content.hashCode();
    }

    @Override
    public String toString() {
        return this.content;
    }
}
